<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('schools', function (Blueprint $table) {
            $table->id();
            $table->string('name')->unique();
            $table->string('mobile')->comment('联系电话');
            $table->string('thumbnail_image')->comment('缩略图');
            $table->string('introduction')->nullable()->comment('简介');
            $table->decimal('share_ratio')->comment('分成比例(%)');

            $table->unsignedTinyInteger('status')->default(1)->comment('状态 1禁用 2启用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('schools');
    }
};
